<?php

include_once 'baseObject_model.php';

class Admin_Profile_model extends BaseObject_model {
	var $dbName = "default";
	var $tableName = 'profile';
	var $primary_key = 'id';

	function __construct() {
		parent::__construct();
	}


	function getMenu() {
		$this->load->config('adminschema');
		$menu = $this->config->item('main_menu');

		$actions = array(
			'order_center'=>true,
			'delivery_center'=>true,
			'finance_center'=>true,
			'goods_manager'=>true,
			'purchase_center'=>true,
			'content_center'=>true,
			'social_crm'=>true,
			'aftersale_center'=>true,
			'storage_center'=>true,
			'stats_center'=>true,
			'marketing'=>true,
			'monitor_center'=>true,
			'customer_center'=>true,
			'admin_setting'=>true,
			'op_center'=>true,
			'invoice_center'=>true,
			'finance_center'=>true,
			'admin_setting'=>true
		);

		foreach($menu as $k => $subMenu) {
			if( !isset($actions[$k]) ) {
				unset($menu[$k]);
			}
		}

		return $menu;
	}


	function getSidemenu($wg) {
		if(empty($wg)){
			return false;
		}
		$this->load->config('adminschema');
		$menu = $this->config->item('main_menu');

		return $menu[$wg];
	}
}
?>
